package cn.yeziji.forum.common;

import java.util.ArrayList;
import java.util.List;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: lenovo
 * \* Date: 2022/3/28
 * \* Time: 15:04
 * \* Description:
 * \ 头像上传类型匹配类
 * @author lzc
 */
public class ForumAvatarMismatch {

    static final List<String> TYPE_MISMATCH = new ArrayList<>();

    static {
        TYPE_MISMATCH.add("image/gif");
        TYPE_MISMATCH.add("image/jpeg");
        TYPE_MISMATCH.add("image/bmp");
        TYPE_MISMATCH.add("image/tiff");
        TYPE_MISMATCH.add("image/png");
    }

    public static Boolean avatarMatch(String avatarType) {
        return TYPE_MISMATCH.contains(avatarType);
    }
}
